<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>hello bootstrap</title>
    <!--导入bootstrap的主样式-->
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">

    <style type="text/css">
        .form-inline .form-group {
            margin-right: 15px;
        }
    </style>
</head>
<body>
<div class="container">
    <form action="#" name="myform" method="post">
        <fieldset disabled>
            <div class="form-group">
                <label>用户名:</label>
                <input type="text" name="username" class="form-control" placeholder="UserName">
            </div>
            <div class="form-group">
                <label>密码:</label>
                <input type="password" name="password" class="form-control" placeholder="Password">
            </div>

            <div class="form-group">
                <lable>文件</lable>
                <input type="file" name="file">
                <p class="help-block">请选择合适的文件</p>
            </div>

            <div class="checkbox">
                <label>
                    <input type="checkbox" name="remember">记住我
                </label>
            </div>

            <div>
                <button type="submit" class="btn btn-default">提交</button>
                <button type="reset" class="btn btn-danger">重置</button>
            </div>
        </fieldset>
    </form>

    <h2>内联表单</h2>
    <form action="#" name="myform" method="post" class="form-inline">
        <div class="form-group">
            <label class="sr-only">用户名:</label>
            <input type="text" name="username" class="form-control" placeholder="UserName" value="陈聪" readonly>
        </div>
        <div class="form-group">
            <label class="sr-only">密码:</label>
            <input type="password" name="password" class="form-control" placeholder="Password">
        </div>

        <div class="checkbox">
            <label>
                <input type="checkbox" name="remember">记住我
            </label>
        </div>

        <button type="submit" class="btn btn-success">提交</button>
    </form>

    <h2>表单输入项插件-addon</h2>
    <form action="#" name="myform" method="post" class="form-inline">
        <div class="form-group">
            <label class="sr-only">邮箱:</label>
            <div class="input-group">
                <div class="input-group-addon">@</div>
                <input type="email" name="email" class="form-control" placeholder="Email">
            </div>
        </div>
        <div class="form-group has-success has-feedback">
            <label class="sr-only">金额:</label>
            <div class="input-group">
                <div class="input-group-addon">$</div>
                <input type="number" name="money" class="form-control" placeholder="money">
                <!--<div class="input-group-addon">.00</div>-->

            </div>
            <span class="glyphicon glyphicon-ok form-control-feedback"></span>
        </div>

        <div class="checkbox">
            <label>
                <input type="checkbox" name="remember">记住我
            </label>
        </div>

        <button type="submit" class="btn btn-success">提交</button>
    </form>

    <h2>水平表单</h2>
    <form action="#" name="myform" method="post" class="form-horizontal">
        <div class="form-group">
            <label class="col-md-1 control-label">用户名:</label>
            <div class="col-md-4">
                <input type="text" name="username" class="form-control" placeholder="UserName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-1 control-label">密码:</label>
            <div class="col-md-4">
                <input type="password" name="password" class="form-control" placeholder="Password">
                <span class="help-block">
                    A block of help text that breaks onto a new line and may extend beyond one line.</span>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-1 col-md-4">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="remember">记住我
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-1 col-md-4">
                <button type="submit" class="btn btn-success">提交</button>
            </div>
        </div>
    </form>

    <h2>内联式的单选框和复选框</h2>
    <div class="form-group">
        <label class="checkbox-inline">
            <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
        </label>
        <label class="checkbox-inline">
            <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
        </label>
        <label class="checkbox-inline">
            <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
        </label>
    </div>

    <div class="form-group">
        <label class="radio-inline">
            <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> 1
        </label>
        <label class="radio-inline">
            <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2"> 2
        </label>
        <label class="radio-inline">
            <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3"> 3
        </label>
    </div>


    <div class="form-group col-md-2">
        <select name="xx" class="form-control">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
        </select>
    </div>

</div>
</body>
</html>